Optimal. Leaf size=45 \[ \frac{x (A b-a B)}{b^2}-\frac{a (A b-a B) \log (a+b x)}{b^3}+\frac{B x^2}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0294363, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {77} \[ \frac{x (A b-a B)}{b^2}-\frac{a (A b-a B) \log (a+b x)}{b^3}+\frac{B x^2}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rubi steps
\begin{align*} \int \frac{x (A+B x)}{a+b x} \, dx &=\int \left (\frac{A b-a B}{b^2}+\frac{B x}{b}+\frac{a (-A b+a B)}{b^2 (a+b x)}\right ) \, dx\\ &=\frac{(A b-a B) x}{b^2}+\frac{B x^2}{2 b}-\frac{a (A b-a B) \log (a+b x)}{b^3}\\ \end{align*}
Mathematica [A] time = 0.0142685, size = 41, normalized size = 0.91 \[ \frac{b x (-2 a B+2 A b+b B x)+2 a (a B-A b) \log (a+b x)}{2 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.001, size = 52, normalized size = 1.2 \begin{align*}{\frac{B{x}^{2}}{2\,b}}+{\frac{Ax}{b}}-{\frac{Bax}{{b}^{2}}}-{\frac{a\ln \left ( bx+a \right ) A}{{b}^{2}}}+{\frac{{a}^{2}\ln \left ( bx+a \right ) B}{{b}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00934, size = 61, normalized size = 1.36 \begin{align*} \frac{B b x^{2} - 2 \,{\left (B a - A b\right )} x}{2 \, b^{2}} + \frac{{\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.63176, size = 103, normalized size = 2.29 \begin{align*} \frac{B b^{2} x^{2} - 2 \,{\left (B a b - A b^{2}\right )} x + 2 \,{\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.531168, size = 37, normalized size = 0.82 \begin{align*} \frac{B x^{2}}{2 b} + \frac{a \left (- A b + B a\right ) \log{\left (a + b x \right )}}{b^{3}} - \frac{x \left (- A b + B a\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25031, size = 61, normalized size = 1.36 \begin{align*} \frac{B b x^{2} - 2 \, B a x + 2 \, A b x}{2 \, b^{2}} + \frac{{\left (B a^{2} - A a b\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]